package com.health.viewscontrols.settings;

import android.os.Handler;
import android.os.Message;

/**
 * Created by John on 2018/3/20.
 */

public class Manager {

    public static final String TAG = "Manager";

    private static Manager mInstance;

    public Handler mHandler;

    public synchronized static Manager getInstance() {
        if (mInstance == null) {
            mInstance = new Manager();
        }
        return mInstance;
    }

    public void setHandler(Handler handler) {
        this.mHandler = handler;
    }

    public void sendSuccessMessage() {
        mHandler.sendEmptyMessage(11);
    }

    public void sendFailMessage() {
        mHandler.sendEmptyMessage(00);
    }
    public void sendCountMessage(Message msg){
        mHandler.sendMessage(msg);
    }
}
